import { reactive, ref } from "vue";

export default function InitHook() {
  const formState = ref<CustomerServiceWaybill.BatchImport>({
    file: []
  });
  const formDataRef = ref<any>(null);
  const submitLoading = ref<boolean>(false);
  const drawerOpts = reactive<Base.DrawerOpts>({
    title: "",
    width: "520px",
    component: "",
    visible: false,
    type: 1,
    passData: {}
  });

  const templateName = {
    1: "装箱信息模版",
    2: "收件信息和装箱信息",
    3: "来款流水模版",
    4: "追加费用模版",
    5: "导入应付对账单模版",
    6: "导入物流轨迹模版",
    7: "导入付款流水",
    8: "导入运输商模版",
    9: "批量导入子转单号",
    10: "批量导入用户",
    11: "保险订单",
    12: "导入账单模版",
    13: "账户管理模版"
  };
  return {
    formState,
    formDataRef,
    submitLoading,
    drawerOpts,
    templateName
  };
}
